extern crate chrono;

#[macro_use]
extern crate rbatis;
#[macro_use]
extern crate lazy_static;

use salvo::prelude::*;
//路由
mod routers;
//按业务区分
mod domain ;

//附加
mod extends ;

#[tokio::main]
async fn main() {

    //日志输出初始化
    tracing_subscriber::fmt().init();

    //数据库连接池初始化
    extends::db::init_rbatis().await;


    Server::new(routers::create_routers())
        .bind(([0, 0, 0, 0], 17979))
        .await;
}
